#ifndef QRREADER_H
#define QRREADER_H

#include <iostream>
#include <vector>
#include <QImage>

#include "point.h"
#include "pixel.h"
#include "finderpattern.h"
#include "version.h"
#include "format.h"
#include "alignmentpattern.h"
#include "timmingpattern.h"
#include "datablock.h"
#include "canvas.h"
#include "converter.h"

using namespace std;

class qrReader
{

    public:
        qrReader ();
        string readQrCode (QImage *m);
        canvas getCanvas ();

    private:
        int pixelProportion;
        point origin;

        canvas log;

        void adjustImage (float angle, QImage *img);
        void determinePixelProportion (point upperLeft, point lowerLeft, QImage *img);
        bool isDataValid (string data);

};

#endif // QRREADER_H


